<%- include('../../ejs/auth/login.ejs') %>
<script type="text/javascript">
    $(function(){
        var key = $.QuickUrlUtils.getRequest('key');
        if(!StringUtils.isEmpty(key)){
            $("body").data("key", key);
        }
        $(".check-box-div").remove();
        page_login.init({
            loginHandler: function(){
                $.JkcsUserInfo.getUserInfoGzd({
                    refresh: true
                    ,callback: function(result){
                        var redirect_uri = $.QuickUrlUtils.getRequest('redirect_uri');
                        if(!StringUtils.isEmpty(redirect_uri)){
                            redirect_uri = decodeURI(redirect_uri);
                            $.QuickUrlUtils.redirectJSBridge({
                                url: redirect_uri
                            });
                        }else{
                            $.pageSwitch.goToUrl('index', 'index');
                        }
                    }
                });
            }
            ,loginPamrams: function(data){
                data['key'] = $("body").data("key");
                return data;
            }
            ,registerBtnClickHandler: function(){
                var key = $("body").data("key");
                $.pageSwitch.goToUrl("beforLogin", "register", "key=" + key);
            }
            ,btnFogetPasswordClickHandler: function(){
                var key = $("body").data("key");
                $.pageSwitch.goToUrl("beforLogin", "forgetPwd", "key=" + key);
            }
        });
    })
</script>